/* 
 *	Copyright (C) 2009-2010 miaohua
 *	http://code.google.com/p/lrcshower/
 *
 *  This Program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2, or (at your option)
 *  any later version.
 *   
 *  This Program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *  GNU General Public License for more details.
 *   
 *  You should have received a copy of the GNU General Public License
 *  along with GNU Make; see the file COPYING.  If not, write to
 *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
 *  http://www.gnu.org/copyleft/gpl.html
 *
 */

#pragma once

// Helper functions to get container box size of one line
class CGlyPhMetricsTextRenderHelper
{
public:
    // Main function, get the container box of one line(use Win API GetGlyphOutline)
    static SIZE GetDrawSize(HDC MemDC,const std::string & Text,bool& HaveOffsetY,short& OffsetY);
    // Calculate the height of j minus b, which is used to align output characters vertically
	static short CalcOffsetY(HDC hDc);
    // Check wether the character is "jJgy" which needs offset of Y
	static bool IsYOffset(unsigned int OneChar);
    // Check wether it is double byte character set or not
	static bool IsDoubleByteChar(unsigned int OneChar);

	static short m_SpaceWidth;   // Interval between characters
	static short m_BlankWidth;   // Width of blank
};
